package com.finley.flowabledemo.design.state;


/**
 * @description: 上下文类
 * @author: xianfei.chao
 * @date 2025/5/31 09:54
 * @version: 1.0
 */
public class WorkContext {

    private IWorkState workState;

    private Integer hours;

    private Boolean isFinish;

    public WorkContext(){
        this.workState = new TwelveWorkState();
    }

    public void handle(){
        this.workState.writeProgram(this);
    }


    public IWorkState getWorkState() {
        return workState;
    }

    public void setWorkState(IWorkState workState) {
        this.workState = workState;
    }

    public Integer getHours() {
        return hours;
    }

    public void setHours(Integer hours) {
        this.hours = hours;
    }

    public Boolean getFinish() {
        return isFinish;
    }

    public void setFinish(Boolean finish) {
        isFinish = finish;
    }
}
